package com.hlkj.warboot.configurer.security.authentication.provider;

import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description TODO WebAuthenticationDetails默认提供了ip和sessionId这2个参数，若登录还需要额外参数则需要自定义类并实现该接口
 * @Author 李星
 * @Date 2019/6/29 22:52
 */
public class MyWebAuthenticationDetails extends WebAuthenticationDetails {
    // 附加登陆字段-验证码
    private final String verifyCode;
    public String getVerifyCode() {
        return verifyCode;
    }

    public MyWebAuthenticationDetails(HttpServletRequest request) {
        super( request );
        this.verifyCode = request.getParameter("verifyCode");
    }
}
